<script>
	import Vue from 'vue';
	export default {
		onLaunch: function() {
			this.$store.commit('initApp');
			uni.getSystemInfo({
			  success: function(e) {
			    // #ifndef MP
			    Vue.prototype.StatusBar = e.statusBarHeight;
			    if (e.platform == 'android') {
			      Vue.prototype.CustomBar = e.statusBarHeight + 50;
			    } else {
			      Vue.prototype.CustomBar = e.statusBarHeight + 45;
			    }
			    // #endif
			    Vue.mixin({
			      data() {
			        return {
			          StatusBar: Vue.prototype.StatusBar,
			          CustomBar: Vue.prototype.CustomBar
			        };
			      }
			    });
			  }
			});
			uni.getSystemInfo({
				success: res => {
					global.screenWidth = res.windowWidth
					global.screenHeight = res.windowHeight
				}
			})
			// #ifdef APP-PLUS
			// 锁定屏幕显示方向为竖屏正方向
			plus.screen.lockOrientation('portrait-primary');
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import './style/icon.css';
	@import './style/iconfont.css';
</style>
